package entity;

public class FoodFactory {

    public static Food factory(String name){
        if ( "apple".equals( name ) ){
            return new Apple();


        }else if ( "banana".equals(name) ){
            return new Banana();

        }else {
            return null;
        }
    }

}
